import os
import platform


def shutdown_computer():
    system = platform.system().lower()

    if system == "windows":
        os.system("shutdown /s /t 1")
    elif system == "linux" or system == "darwin":  # Darwin is macOS
        os.system("sudo shutdown -h now")
    else:
        print(f"Unsupported operating system: {system}")